1. Field of the Invention
The present invention relates to a station discovery processing method and a wireless communication device for rapidly performing connection processing in a wireless communication system that performs communication in compliance with a wireless communication method (e.g., the standards of infrared communication methods (IrDA: Infrared Data Association)) having a congestion control function.
2. Description of the Prior Art
Generally, communication methods for exchanging data without using cables between different computers and between a computer and peripheral devices include Bluetooth, wireless LAN (IEEE802.11a, IEEE802.11b), non-contact IC wireless communication, and infrared communication methods using infrared rays.
Infrared communication has the advantages that costs and power consumption can be reduced, and devices can be miniaturized. It is used in various apparatuses including a remote control for television. Infrared ports must be made to face each other because infrared rays travel straightly, infrared rays do not pierce through shields such as walls, and the communication distance of infrared communication is short. For these reasons, infrared communication has less possibility to suffer hacking and has higher security than other wireless communications (e.g., wireless LAN IEEE802.11a, IEEE802.11b, etc.). Therefore, a study is being made of use in electronic settlement service.
For example, IrDA standards, which are the standards of infrared communication methods, intend temporary communication among unspecified devices. Therefore, the IrDA standards require, during connection processing, a procedure for controlling the congestion of communication such as a station discovery procedure for detecting devices existing in the range of infrared communication. Data link protocol IrLAP (IrDA Serial Infrared Link Access Protocol) of IrDA defines that infrared data communication consists of processes such as station discovery, connection, data exchange, and disconnection. Moreover, a procedure referred to as media access control is defined to obtain the right of access (transmission right) to the physical layer during station discovery and during connection.
FIG. 1 is a drawing showing the flow of a station discovery procedure based on the conventionally known IrDA standards. FIG. 1 mainly shows the operation of the IrLAP layer and lower layers. As shown in FIG. 1, upon receiving a discovery request (step S501) from an upper layer (IrLMP (IrDA Link Management Protocol), to start infrared communication, a starting station (the side to start communication) performs media monitoring over 500 ms to monitor signals from other devices (step S502). If no signals arrive from other devices, the starting station transmits n (n is the number of slots (1, 6, 8, 16)) pieces of infrared frames called XID (exchange ID) commands (step S503) and then a last XID command (step S504). If no response is obtained from other stations in the meantime, the starting station performs media monitoring again over 500 ms (step S505), and transmits n pieces of XID commands (step S506). If an XID response is obtained from a responding station (the side to receive the communication) in response to the XID commands (step S507), the starting station transmits a last XID command (step S508), and sends a discovery response indicating that a station is discovered, to the upper layer (IrLMP) (step S509). The discovery processing is completed by the above processing, subsequently connection processing is performed, and data exchange becomes possible.
As has been described above, the station discovery procedure in the IrDA standards requires much time. If the number of slots is 6, one second or more is required. For example, if XID command transmission slot interval is 85 ms, and last XID command (46 bytes maximum) transmission time is 48 ms, time required for station discovery processing is 1058 ms (medium monitoring time 500 ms+XID command transmission time (transmission interval) 85 ms×the number of slots 6+last XID command transmission time 48 ms). It is unrealistic to use the station discovery procedure under services requiring high speed.
On the other hand, as a prior art that rapidly performs a station discovery procedure, there is a method which continues transmitting XID commands until a responding station is discovered (e.g., Japanese Published Unexamined Patent Application 2002-204201). FIG. 2 shows the flow of a high speed method of a prior art station discovery procedure described in Japanese Published Unexamined Patent Application 2002-204201. In FIG. 2, upon receiving a discovery request (step S601), a starting station immediately transmits an XID command (step S602). This method continues transmitting the XID command until a response is obtained from a responding station (steps S603 and S604). When an XID response is obtained from a responding station (step S605), the starting station terminates the discovery processing and returns a discovery response to an upper layer (step S606).
However, the aforementioned high speed method of the prior art station discovery procedure has several problems. Since plural responding stations can respond at the same time, when XID responses are returned, collision occurs in the starting station and no XID response may not be obtained.
FIG. 3 shows the flow of a prior art station discovery procedure. Upon starting station discovery, a starting station transmits a discovery request frame (XID command) (step S701). Thereafter, the starting station waits for the reception of data for prescribed time (step S702), and if no data is received, it transmits the discovery request frame again. Upon receiving data, it determines whether the received data is a discovery response frame (XID response) (step S703), and if a discovery response frame, it transmits a last discovery request frame (last XID command) (step S704), and terminates the discovery procedure. If not a discovery response frame, the starting station deletes the received frame, determining that noise invaded, and transmits the discovery request frame again.
As described above, the prior art method generally ignores frames other than discovery response frames received during discovery processing. When XID responses are obtained at the same time from plural responding stations, frames received in a starting station have been destroyed due to a collision. However, in this case, the starting station cannot determine whether the frames have been destroyed because responses have been obtained at the same time from plural responding stations, or noise invaded the frames. As a result, when plural responding stations exist, the starting station cannot discover other stations permanently.
The infrared communication device described in Japanese Published Unexamined Patent Application 2002-204201 starts a station discovery operation without monitoring communication and continues the station discovery operation until the command to stop infrared communication is explicitly given from the user. As a result, the device interferes with discovery processing having been started earlier by another device, and the device having started earlier the discovery processing cannot make connection permanently.
Moreover, since the discovery procedure described in Japanese Published Unexamined Patent Application 2002-204201 continues transmitting XID commands until a response is obtained from a responding station, power consumption increases. If an operator exists in the starting station, an increase in power consumption can be curbed to some extent by the operator explicitly giving the command to stop the infrared communication. However, with automatic terminals in which an operator does not always exist, such as automatic vending machines and unattended shop terminals, power consumption would increase.
The present invention solves the problems of the aforementioned prior art and provides a station discovery processing method and a wireless communication device that enable rapid and sure connection with devices that perform communication in compliance with a wireless communication method (e.g., the standards of infrared communication methods) having a congestion control function.